﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using CompanyPayRollSystem.BusinessLayer;

namespace CompanyPayRollSystem
{
    public partial class AddJobLevelForm : Form
    {
        public AddJobLevelForm()
        {
            InitializeComponent();
        }

        private void btnAdd_Click(object sender, EventArgs e)
        {
            try
            {
                JobLevelManager.AddJobLevel(this.txtName.Text);
                MessageBox.Show("job Level added successfully.", "Added", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.Close();
            }
            catch (Exception)
            {
                MessageBox.Show("job Level not added.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

        }
    }
}
